"""hulaquan URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include

from api import views

urlpatterns = [
    path('admin/', admin.site.urls),
    path('category/', views.Category.as_view()),

    path('new/category/', views.NewCategory.as_view()),
    path('article/', views.Article.as_view()),
    path('new/article/', views.NewArticle.as_view()),
    # 分页
    path('page/article/', views.PageArticle.as_view()),
    # 集成APiview
    path('view/article/', views.ApiViewArticle.as_view()),
]

urlpatterns += [
    path('hlq/', include('hlq.urls')),
]

urlpatterns += [
    path('apiView/', include('apiView.urls')),
]

# 版本控制需要添加的，另一个需要修改的地方是settings中
# urlpatterns += [
#     path('api/<version>/', include('banben.urls')),
# ]

# 版本控制需要添加的，另一个需要修改的地方是settings中
urlpatterns += [
    path('api/<version>/', include('authDemo.urls')),
]

urlpatterns += [
    path('api/mini/', include('xiaochengxu.urls')),
]
